﻿Imports System.Threading
Public Class SplashScreen

    Private Sub SplashScreen_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        e.Cancel = True
    End Sub

    Private Sub SplashScreen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Start()
        statusLbl.Text = "Search for new colors"
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar1.Increment(2)
        If ProgressBar1.Value = 10 Then
            statusLbl.Text = "Search for new fonts"
            Thread.Sleep(3000)
            'TODO: Nach neuen Schriftarten suchen
        End If
        If ProgressBar1.Value = 50 Then
            statusLbl.Text = "Starting Designer-Host ..."
            Thread.Sleep(2000)
            'TODO: Designer-Host starten

        End If
        If ProgressBar1.Value = 80 Then
            statusLbl.Text = "Search for new plugins"
            Thread.Sleep(3000)
            'TODO: Nach neuen Plugins suchen
        End If
        If ProgressBar1.Value = 100 Then
            Timer1.Stop()
            Me.Hide()
            frmMain.Show()
            frmPen.Show()
            frmColors.Show()
        End If
    End Sub
End Class
